package demo12;

import java.io.File;
import java.io.IOException;

public class test7 {
    public static void main(String[] args) throws IOException {
        File src = new File("d:/test.txt");
        File dest = new File("d:/mma.txt");
        System.out.println(src.exists());
        System.out.println(src.createNewFile());
        System.out.println(src.exists());
        System.out.println(src.renameTo(dest));
        System.out.println(src.exists());
        System.out.println(dest.exists());
    }
}
